package com.syyo.gulimall.admin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.syyo.gulimall.admin.domain.entity.SysRole;
import com.syyo.gulimall.admin.domain.req.RoleReq;
import com.syyo.gulimall.admin.domain.resp.RoleResp;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author wang
 * @since 2020-07-17
 */
public interface SysRoleService extends IService<SysRole> {

    int add(RoleReq req);

    int del(Integer id);

    int edit(RoleReq req);

    RoleResp findOne(Integer id);

    IPage<SysRole> findAll(Integer pageNum, Integer pageSize, RoleReq req);

    Collection<GrantedAuthority> findByUsersId(Integer userId);

    int auth(RoleReq req);
}
